package com.klangner.animation.sprites
{
	import com.klangner.geom.Vector2D;
	import com.klangner.move.path.IPath;
	
	import flash.display.Sprite;

  public class MovableSprite extends Sprite {

    private var _path:IPath;
    

    public function MovableSprite(path:IPath) {
      _path = path;
    }
    
    public function move():void{
      
      if(_path != null){
        _path.move()
        var point:Vector2D = _path.position;
      
        x = point.x;
        y = point.y;
        this.rotation = _path.angle * 180 / Math.PI;
      }
    }
  
  }

}